# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-openpyxl
_pkgname=openpyxl
pkgver=2.6.4
pkgrel=2
pkgdesc='A Python library to read/write Excel 2007 xlsx/xlsm files.'
arch=('any')
url='https://pypi.org/project/openpyxl/#files'
license=('MIT')
depends=('python2-jdcal' 'python2-et-xmlfile')
makedepends=('python2-setuptools')
optdepends=('python2-pillow6: needed to include images'
            'python2-lxml: alternative XML backend'
            'python2-defusedxml: guard against various XML vulnerabilities'
            'python2-pandas: for iteration over Pandas DataFrames')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e2785d583d7c9bcc77ffe571dad115089dc7b9ff1e8b03dd6ed4ed8ff1405d31115b52792ed7af98a1bab4bc00f3f770c77b681798c4c9eba2b618cf6bc4fb2f')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

